package grape.wx.rest.mp.basic.mvc;

import grape.base.rest.client.dict.DictClient;
import grape.base.service.dict.api.IDictService;
import grape.base.service.dict.po.Dict;
import grape.common.rest.advice.DisableGRB;
import grape.common.rest.advice.DisableGRM;
import grape.common.rest.mvc.SuperController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * <p>
 * 公众号配置内部调用接口
 * </p>
 *
 * @author yangwei
 * @since 2019-5-8
 */
@RestController
@RequestMapping("/wx/mp/config")
@ApiIgnore
public class MpConfigInnerController extends SuperController {
    @Autowired
    private DictClient dictClient;

    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/getDictCodeById")
    public Dict getDictById(String id){
        return dictClient.getDictById(id);
    }

    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/getDictCodeByCode")
    public Dict getDictByCode(String code){
        return dictClient.getDictByCode(code);
    }

}
